var fs = require("fs");
var data = '';

//将文件读入内存(数据以流的形式存在)
//可以暂停
var reads = fs.createReadStream("./static/作业.txt");

reads.setEncoding("utf-8");

reads.on("data", function(chunk) {
    data = data + chunk;
})
reads.on("end", function() {
    console.log(data);
})
reads.on("error", function(err) {
    console.log(err.stack);
})